import * as ReactDOM from "react-dom/client";
import {
  createHashRouter,
  RouterProvider,
} from "react-router-dom";
import "./index.css";
import useRouterConfig from './router-config.tsx'
import {DataProvider} from "./provider/DataProvider.tsx";
import zh_CN from "antd/es/locale/zh_CN";
import {ConfigProvider} from "antd";

const router = createHashRouter(useRouterConfig());
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
    <ConfigProvider locale={zh_CN}>
      <DataProvider>
        <RouterProvider router={router}/>
      </DataProvider>
    </ConfigProvider>
);